![]() |
PATH![]() |
![]() ![]() |
pascal OSStatus DrawThemeButton (
const Rect *inBounds,
ThemeButtonKind inKind,
const ThemeButtonDrawInfo *inNewInfo,
const ThemeButtonDrawInfo *inPrevInfo,
ThemeEraseUPP inEraseProc,
ThemeButtonDrawUPP inLabelProc,
UInt32 inUserData);
The DrawThemeButton function draws a theme-compliant button. If a ThemeEraseProcPtr is specified in the inEraseProc parameter, DrawThemeButton uses that function to erase the background of the button before drawing the button. After the button is drawn, if a ThemeButtonDrawProcPtr is specified in the inLabelProc parameter, DrawThemeButton calls that function to draw the button's label.
Note that DrawThemeButton also draws any appearance adornments for the button and that these can extend beyond the button's basic bounding rectangle, as specified in the inBounds parameter, and may be of variable shape. You may therefore wish to call the function GetThemeButtonBackgroundBounds to obtain the actual rectangle containing the pixels belonging to a button under the current theme.